/**
 * Created by mapbar_front on 2019/8/27.
 */
import React,{Component} from 'react';

const ThemeContext = React.createContext('light');

class ThemeButton extends Component{
    static contextType = ThemeContext;
    render(){
        return(
            <div>
                Hello,{ this.context }
            </div>
        )
    }
}

class Context827 extends Component{
    constructor(props){
        super(props);
    }
    render(){
        return(
            <ThemeContext.Provider value="dark">
                <ThemeButton/>
            </ThemeContext.Provider>
        )
    }
}

export default Context827;
